package org.example.cicdi.service.impl.third;


import org.example.codegenerate.modelext.WebVo.domian.table.TableVoDomain;
import org.example.codegenerate.modelext.WebVo.domian.table.WebModelVo;
import org.springframework.stereotype.Component;

import javax.persistence.Table;
@Component
public class NoTVOAndHasTable extends AbstractTVOAndTable{
    public NoTVOAndHasTable(){
        //this.localtableCondition=new TableCondition();
        localtableCondition.setHasorNotSelfAnnotationTVO(EnumConsantExistType.NoTVO.getStatus());
        localtableCondition.setHasorNotJpaTableAnnotation(EnumConsantExistType.HasTable.getStatus());
    }
    @Override
    protected void execute(Class<?> cl, WebModelVo webModelVo) {
        TableVoDomain tableVoDomain=webModelVo.getTableVoDomain();
        //TVo vo = cl.getAnnotation(TVo.class);
        Table table=cl.getAnnotation(Table.class);

        setTVOwithDefaultTVO(cl,tableVoDomain,webModelVo);

        tableVoDomain.setTableName(table.name());
    }
}
